package com.qf.smartplatform.mapper;

import com.qf.smartplatform.pojo.SysDevice;
import org.apache.ibatis.annotations.*;

import java.util.List;

/*** @author Tgb
 * @version V1.0
 * @Project smartplatform
 * @Package com.qf.smartplatform.mapper
 * @Description:
 * @Date 2022/9/10 11:00
 */
public interface DeviceMapper {
    @Select("select * from sys_device where device_id=#{deviceId}")
    SysDevice findByDeviceId(String deviceId);
    void addDevice(SysDevice sysDevice);
    @Select("select * from sys_device where bind_user_id = #{userId}")
    List<SysDevice> findByUserId(Long userId);
    @Delete("delete from sys_device where device_id = #{deviceId}")
    int deleteById(String deviceId);
    int updateDevice(SysDevice sysDevice);

    int updateDeviceStatus(@Param("deviceId") String deviceId, @Param("status")int status);
}
